package com.boot.datademo2.dao.mapper;

import com.boot.datademo2.controller.model.UserRegisterRequest;
import com.boot.datademo2.dao.pojo.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Author:yinbo
 * Date:2021/9/2714:54
 **/
@Mapper
@Repository
public interface UserMapper {
//    查询所有用户
    List<UserDO> getAllUser();
//    根据id查询用户
    UserDO getUserById(int id);
//    注册用户
    int addUser(UserDO userDO);
//    修改用户
    int updateUser(UserDO userDO);
//    根据id删除用户
    int deleteUser(int id);
    //    根据name查询用户
    UserDO getUserByName(String name);

}
